1. Field of the Invention
The present invention relates to image processing which enhances a quality of an image in a document scanned and input by an image input device, and more particularly, to a method of digital image quality enhancing and an apparatus for enhancing a quality of a digital image on a background region of a document such as a newspaper article, in which degradation of the image quality occurs.
2. Description of the Related Art
Examples of conventional image quality enhancing techniques include histogram equalization, contrast stretching, and a method of enhancing image quality shown in FIG. 1. FIG. 1 is a flowchart showing a conventional image processing method disclosed in Korean Patent Publication No. 1999-43374. A histogram equalization process includes: calculating an occurrence frequencies of gray levels from an input image; computing a histogram value or probability density function (PDF) using the occurrence frequencies of gray levels; integrating the PDF to develop a cumulative distribution function (CDF); and mapping the input image to make the distribution of brightness values uniform using the CDF. This histogram equalization approach has a major disadvantage such that objects in a high quality image with a uniform distribution of brightness values lose their correct relative brightness values.
A contrast stretching technique involves: calculating occurrence frequencies of gray levels of an input image; computing a histogram value or PDF using the occurrence frequencies of gray levels; computing maximum and minimum brightness values of the image histogram; and expanding the gray level distribution based on a difference between the minimum and maximum brightness values. The contrast stretching technique has a problem in that undesired results arise in a case where an input image has special characteristics or contains noise.
When reading a document image using an image input device comprised of a memory for white shading correction, a memory for black shading correction, and a preprocessor with a maximum value detector, the conventional image quality enhancement method illustrated in FIG. 1 includes: generating reference data for correcting distortion of the document image (S201); setting maximum and minimum reference voltages in order to adjust contrast and brightness of the document image and eliminate the background color (S202); compensating for image distortion by simultaneously performing black shading correction and white shading correction on the document image using the reference data and performing image processing on the document image using the set maximum and minimum reference voltages (S203); and outputting the document image subjected to image distortion correction and image processing as digital image data (S204). In an image input device such as a scanner, black shading correction is performed to compensate for a difference between pixels due to different characteristics of image sensors such as a charge coupled device (CCD) or a contact image sensor (CIS). Along with black shading correction, white shading correction is performed to correct distortion caused by non-uniformity of a light source, local variations in reflectivity of a mirror and a transmissivity of a lens in a scanner optical system, contamination on a light path, etc. According to this conventional method, contrast is corrected based only on data obtained by white shading correction and black shading correction. However, varying background intensity of the document image is not reflected using only the above shading corrections, thus the conventional method is not adaptive to a document. Another problem is that longer processing time is required for image quality enhancement since prescan is necessary in order to obtain a maximum brightness value for brightness correction.